<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../angular.js"></script>
	</head>
	<body ng-app="myApp">
		<div ng-controller="ckController">
			<button ng-click="add(1)">+</button>
			<button ng-click="rec(1)">-</button>
			{{counter}}
		</div>
		
		<script type="text/javascript">
			var app=angular.module("myApp",[]);
			app.controller("ckController",function($scope){
				$scope.counter=0;
				$scope.add=function(amout){
					$scope.counter+=amout;
				}
				$scope.rec=function(amout){
					$scope.counter-=amout;
				}
				
			});
		</script>
	</body>
</html>
